home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / t2win-32 / _langage.frm (.txt) < prev    next >
Visual Basic Form  |  1998-07-13  |  9KB  |  264 lines

  1. VERSION 5.00
  2. Begin VB.Form frmLanguage 
  3.    BorderStyle     =   4  'Fixed ToolWindow
  4.    Caption         =   "Language"
  5.    ClientHeight    =   4395
  6.    ClientLeft      =   1890
  7.    ClientTop       =   3270
  8.    ClientWidth     =   7170
  9.    MaxButton       =   0   'False
  10.    MDIChild        =   -1  'True
  11.    PaletteMode     =   1  'UseZOrder
  12.    ScaleHeight     =   4395
  13.    ScaleWidth      =   7170
  14.    ShowInTaskbar   =   0   'False
  15.    Begin VB.Frame Frame3 
  16.       Caption         =   "&Select a language"
  17.       Height          =   1275
  18.       Left            =   90
  19.       TabIndex        =   14
  20.       Top             =   1620
  21.       Width           =   2445
  22.       Begin VB.OptionButton Option1 
  23.          Caption         =   "&English"
  24.          Height          =   195
  25.          Index           =   0
  26.          Left            =   270
  27.          TabIndex        =   16
  28.          Top             =   450
  29.          Value           =   -1  'True
  30.          Width           =   1275
  31.       End
  32.       Begin VB.OptionButton Option1 
  33.          Caption         =   "&French"
  34.          Height          =   195
  35.          Index           =   1
  36.          Left            =   270
  37.          TabIndex        =   15
  38.          Top             =   900
  39.          Width           =   1275
  40.       End
  41.    End
  42.    Begin VB.CheckBox Check1 
  43.       Caption         =   "OLE Check"
  44.       Height          =   195
  45.       Left            =   5040
  46.       TabIndex        =   12
  47.       Top             =   1980
  48.       Width           =   1725
  49.    End
  50.    Begin VB.Frame Frame2 
  51.       Height          =   570
  52.       Left            =   0
  53.       TabIndex        =   6
  54.       Top             =   -90
  55.       Width           =   7170
  56.       Begin VB.CommandButton cmdNP 
  57.          Caption         =   ">"
  58.          Height          =   285
  59.          Index           =   1
  60.          Left            =   6750
  61.          TabIndex        =   11
  62.          Top             =   195
  63.          Width           =   285
  64.       End
  65.       Begin VB.CommandButton cmdNP 
  66.          Caption         =   "<"
  67.          Height          =   285
  68.          Index           =   0
  69.          Left            =   5850
  70.          TabIndex        =   10
  71.          Top             =   195
  72.          Width           =   285
  73.       End
  74.       Begin VB.CommandButton Command1 
  75.          Caption         =   "&Go"
  76.          Default         =   -1  'True
  77.          Height          =   285
  78.          Left            =   6210
  79.          TabIndex        =   9
  80.          Top             =   195
  81.          Width           =   465
  82.       End
  83.       Begin VB.ComboBox cmb_Function 
  84.          Height          =   315
  85.          Left            =   1365
  86.          TabIndex        =   7
  87.          Top             =   180
  88.          Width           =   4395
  89.       End
  90.       Begin VB.Label Label2 
  91.          Caption         =   "&Select a function"
  92.          Height          =   255
  93.          Left            =   90
  94.          TabIndex        =   8
  95.          Top             =   210
  96.          Width           =   1275
  97.       End
  98.    End
  99.    Begin VB.ListBox List1 
  100.       Height          =   1035
  101.       Left            =   105
  102.       TabIndex        =   4
  103.       Top             =   3255
  104.       Width           =   6945
  105.    End
  106.    Begin VB.TextBox txt_Result 
  107.       BackColor       =   &H00C0C0C0&
  108.       BorderStyle     =   0  'None
  109.       Height          =   855
  110.       Left            =   105
  111.       Locked          =   -1  'True
  112.       MultiLine       =   -1  'True
  113.       ScrollBars      =   2  'Vertical
  114.       TabIndex        =   2
  115.       Top             =   630
  116.       Width           =   6945
  117.    End
  118.    Begin VB.Frame Frame1 
  119.       Caption         =   "Some objects"
  120.       Height          =   1275
  121.       Left            =   2610
  122.       TabIndex        =   0
  123.       Top             =   1620
  124.       Width           =   4425
  125.       Begin VB.CommandButton Command2 
  126.          Caption         =   "OLE Command"
  127.          Height          =   375
  128.          Left            =   180
  129.          TabIndex        =   13
  130.          Top             =   720
  131.          Width           =   1905
  132.       End
  133.       Begin VB.TextBox Text1 
  134.          Height          =   330
  135.          Left            =   2415
  136.          TabIndex        =   3
  137.          Text            =   "Standard Text"
  138.          Top             =   735
  139.          Width           =   1800
  140.       End
  141.       Begin VB.CommandButton Command3 
  142.          Caption         =   "Standard Command"
  143.          Height          =   375
  144.          Left            =   180
  145.          TabIndex        =   1
  146.          Top             =   270
  147.          Width           =   1905
  148.       End
  149.    End
  150.    Begin VB.Label Label1 
  151.       Caption         =   "Contents of the language file"
  152.       Height          =   225
  153.       Left            =   105
  154.       TabIndex        =   5
  155.       Top             =   2940
  156.       Width           =   6945
  157.    End
  158. Attribute VB_Name = "frmLanguage"
  159. Attribute VB_GlobalNameSpace = False
  160. Attribute VB_Creatable = False
  161. Attribute VB_PredeclaredId = True
  162. Attribute VB_Exposed = False
  163. Option Explicit
  164. Option Base 1
  165. Private Const Iteration = 10
  166. Dim IsLoaded         As Integer
  167. Dim TimerStartOk     As Integer
  168. Dim TimerCloseOk     As Integer
  169. Dim TimerHandle      As Integer
  170. Dim TimerValue       As Long
  171. Private Sub cmdNP_Click(Index As Integer)
  172.    Call sub_NextPrev(cmb_Function, Index)
  173. End Sub
  174. Private Sub cmb_Function_Click()
  175.    If (IsLoaded = False) Then Exit Sub
  176.    Call cDisableFI(mdiT2W.Picture1)
  177.    txt_Result = ""
  178.    DoEvents
  179.    Select Case cmb_Function.ListIndex
  180.       Case 0
  181.          Call TestReadSaveCtlLanguage
  182.       Case 1
  183.          Call TestReadSaveCtlLanguageExt
  184.    End Select
  185.    DoEvents
  186.    Call cEnableFI(mdiT2W.Picture1)
  187. End Sub
  188. Private Sub Form_Activate()
  189.    mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
  190. End Sub
  191. Private Sub Form_Load()
  192.    Dim intResult        As Integer
  193.    IsLoaded = False
  194.    Show
  195.    Call sub_Load_Combo(cmb_Function, T2WDirInst + "_langage.t2w")
  196.    intResult = cChDir(T2WDirTest)
  197.    IsLoaded = True
  198. End Sub
  199. Private Sub Command1_Click()
  200.    Call cmb_Function_Click
  201. End Sub
  202. Private Sub TestReadSaveCtlLanguage()
  203.    Dim intResult        As Integer
  204.    Dim strResult        As String
  205.    Dim strDisplay       As String
  206.    Dim i                As Integer
  207.    Dim File1            As String
  208.    strResult = ""
  209.    strDisplay = ""
  210.    Call cObjectMethod(List1, "clear", "")
  211.    File1 = T2WDirTest + "\save control language.test"
  212.    strDisplay = strDisplay & "SaveCtlLanguage of this Form is '" & cSaveCtlLanguage(Me, 255, File1) & "'" & vbCrLf
  213.    strDisplay = strDisplay & "ReadCtlLanguage of this Form is '" & cReadCtlLanguage(Me, 255, File1) & "'" & vbCrLf
  214.    strDisplay = strDisplay & "Load file '" & File1 & "' into the list box 'List1' is '" & cFileToListBox(List1.hwnd, File1) & "'"
  215.    txt_Result = strDisplay
  216.    'time the function
  217.    TimerHandle = cTimerOpen()
  218.    TimerStartOk = cTimerStart(TimerHandle)
  219.    For i = 1 To Iteration
  220.       intResult = cReadCtlLanguage(Me, 1, File1)
  221.    Next i
  222.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  223.    TimerCloseOk = cTimerClose(TimerHandle)
  224. End Sub
  225. Private Sub TestReadSaveCtlLanguageExt()
  226.    Dim intResult        As Integer
  227.    Dim strResult        As String
  228.    Dim strDisplay       As String
  229.    Dim i                As Integer
  230.    Dim File1            As String
  231.    strResult = ""
  232.    strDisplay = ""
  233.    Call cObjectMethod(List1, "clear", "")
  234.    File1 = T2WDirTest + "\save control language extended.test"
  235.    strDisplay = strDisplay & "SaveCtlLanguageExt of this Form is '" & cSaveCtlLanguageExt(Me, 255, File1) & "'" & vbCrLf
  236.    strDisplay = strDisplay & "ReadCtlLanguageExt of this Form is '" & cReadCtlLanguageExt(Me, 255, File1) & "'" & vbCrLf
  237.    strDisplay = strDisplay & "Load file '" & File1 & "' into the list box 'List1' is '" & cFileToListBox(List1.hwnd, File1) & "'"
  238.    txt_Result = strDisplay
  239.    'time the function
  240.    TimerHandle = cTimerOpen()
  241.    TimerStartOk = cTimerStart(TimerHandle)
  242.    For i = 1 To Iteration
  243.       intResult = cReadCtlLanguageExt(Me, 1, File1)
  244.    Next i
  245.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  246.    TimerCloseOk = cTimerClose(TimerHandle)
  247. End Sub
  248. Private Sub Option1_Click(Index As Integer)
  249.    Dim intResult        As Integer
  250.    If (cmb_Function.ListIndex = 0) Then
  251.       If (Index = 0) Then
  252.          intResult = cReadCtlLang